package com.dhnsoft.代码随想录.双指针法;

/**
 * ClassName: d02_344_反转字符串
 * Package: com.dhnsoft.代码随想录.双指针法
 * Description:
 *
 * @Author dhn
 * @Create 2024/3/20 11:23
 * @Version 1.0
 */
public class d02_344_反转字符串 {

    public void reverseString(char[] s) {
        int i = 0;
        int j = s.length-1;
        while (i<j){
            char temp = s[i];
            s[i] = s[j];
            s[j] = temp;
        }
    }

}
